﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class Admin_Admin : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Context.User.Identity.IsAuthenticated)
        {
            FormsAuthentication.RedirectToLoginPage();
        }
        if (!Page.IsPostBack)
        {
            lblFullName.Text = Common.GetKeyUserInfo("TenTruyCap");
        }
    }

    protected void imgToogle_Click(object sender, ImageClickEventArgs e)
    {
        if (PanelLeft.Width == 220)
        {
            MenuTitle.Visible = false;
            TreeMain.Visible = false;
            imgToogle.ImageUrl = "~/Images/hrm_05.png";
            PanelLeft.Width = 25;
            imgToogle.ToolTip = "Show menu";
        }
        else
        {
            TreeMain.Visible = true;
            MenuTitle.Visible = true;
            imgToogle.ImageUrl = "~/Images/hrm_06.png";
            PanelLeft.Width = 220;
            imgToogle.ToolTip = "Hide menu";
        }
    }

    protected void lkProfile_Click(object sender, EventArgs e)
    {

    }

    protected void lkChangePass_Click(object sender, EventArgs e)
    {
        Session.Clear();
        FormsAuthentication.SignOut();
        FormsAuthentication.RedirectToLoginPage();
    }
}
